package cn.com.connext.scrm.service;


import cn.com.connext.scrm.domain.master.RecordOpenWindow;
import cn.com.connext.scrm.repository.master.RecordOpenWindowRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Service;


@Service
public class RecordOpenWindowService {
    private final Logger log = LoggerFactory.getLogger(RecordOpenWindowService.class);

    @Autowired
    private RecordOpenWindowRepository recordOpenWindowRepository;


    public void save(RecordOpenWindow taskRecord) {
        recordOpenWindowRepository.save(taskRecord);
    }

    public RecordOpenWindow findByUnionIdAndCreateTime(String unionId, String createTime) {
        log.info("unionId————"+unionId+",createTime————"+createTime);
        return recordOpenWindowRepository.findByUnionIdAndCreateTime(unionId,createTime);
    }
}
